package learn.up.collections.hash;

import java.util.HashSet;
import java.util.Set;

/**
 *
 * @author NANUTO
 * @date 2017年11月29日 上午12:48:28
 */
public class Client {

	public static void main(String[] args) {
		People p1 = new People();
		p1.setAge(12);
		p1.setName("JOHN");
		People p2 = new People();
		p2.setAge(12);
		p2.setName("JOHN2");
		People p3 = new People();
		p3.setAge(14);
		p3.setName("JOHN");
		People p4 = new People();
		p4.setAge(12);
		p4.setName("JOHN");
		People p5 = new People();
		p5.setAge(15);
		p5.setName("JOHN3");
		
		Set<People> set = new HashSet<People>();
		System.out.println(set.add(p1));
		System.out.println(set.add(p2));
		System.out.println(set.add(p3));
		System.out.println(set.add(p4));
		System.out.println(set.add(p5));
		System.out.println(set.add(p5));
		System.out.println(set.add(null));
		System.out.println(set.add(null));
	}
}
